import requests;
import re;
import json;


from utils.Utils import printFetchUrl, merge_two_dicts;
from CsvExport import CsvExport;

class DataProcess:
    def __init__(self, offerDic):
        self.offerDic = offerDic;

    def printTitles(self):
        # print(1)
        for item in self.offerDic:
        #     print(item)
            print("========%s========" % item['information']['puretitle'])
        # dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
        # dict2 = {'Name': 'Zara2', 'Age': 7, 'Class': 'First'}
        # d = merge_two_dicts(dict, dict2)
        # print(d)

    def process(self):
        self.exportCsv();

    def exportCsv(self):
        csvExport = CsvExport(self.offerDic);
        csvExport.export()

